翻訳と辞書
Words near each other
・ Composition for the Axemen
・ Composition for Tithes (Ireland) Act 1823
・ Composition for Twelve Instruments
・ Composition H6
・ Composition leather
・ Composition of Causes
・ Composition of Connacht
・ Composition of Mars
・ Composition of matter
・ Composition of relations
・ Composition of the German State Parliaments
・ Composition of the human body
・ Composition of Yards and Perches
・ Composition operator
・ Composition ornament
Composition over inheritance
・ Composition ring
・ Composition roller
・ Composition school
・ Composition series
・ Composition studies
・ Composition with creditors
・ Composition with Still Life
・ Composition/Improvisation Nos. 1, 2 & 3
・ Compositional data
・ Compositional domain
・ Compositional pattern-producing network
・ Compositions (Anita Baker album)
・ Compositions 1960
・ Compositions by Liliuokalani


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Composition over inheritance : ウィキペディア英語版
Composition over inheritance

Composition over inheritance (or Composite Reuse Principle) in object-oriented programming is the principle that classes should achieve polymorphic behavior and code reuse by composition (containing other classes that implement the desired functionality), instead of through inheritance (being a subclass). This is an often-stated principle of OOP, such as in the influential ''Design Patterns:'' "Favor 'object composition' over 'class inheritance'."
==Basics==
An implementation of composition over inheritance typically begins with the creation of various interfaces representing the behaviors that the system must exhibit. The use of interfaces allows this technique to support the polymorphic behavior that is so valuable in object-oriented programming. Classes implementing the identified interfaces are built and added to business-domain classes as needed. Thus, system behaviors are realized without inheritance. In fact, business-domain classes may all be base classes without any inheritance at all. Alternative implementation of system behaviors is accomplished by providing another class that implements the desired behavior interface. Any business-domain class that contains a reference to the interface can easily support any implementation of that interface and the choice can even be delayed until run time.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Composition over inheritance」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.